package com.wcpdoc.api.controller;

import com.alibaba.excel.EasyExcel;
import com.wcpdoc.api.entity.UserEntity;
import com.wcpdoc.base.entity.*;
import com.wcpdoc.base.service.OrgService;
import com.wcpdoc.base.service.TagInfoService;
import com.wcpdoc.base.service.UserExService;
import com.wcpdoc.base.service.UserService;
import com.wcpdoc.core.controller.BaseController;
import com.wcpdoc.core.entity.PageIn;
import com.wcpdoc.core.entity.PageOut;
import com.wcpdoc.core.entity.PageResult;
import com.wcpdoc.core.entity.PageResultEx;
import com.wcpdoc.core.exception.MyException;
import com.wcpdoc.core.service.OnlineUserService;
import com.wcpdoc.core.util.StringUtil;
import com.wcpdoc.core.util.ValidateUtil;
import com.wcpdoc.file.service.FileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 用户控制层
 *
 * v1.0 zhanghc 2016-6-15下午17:24:19
 */
@Controller
@RequestMapping("/api/tag")
public class TagController extends BaseController {
	private static final Logger log = LoggerFactory.getLogger(TagController.class);

	@Resource
	private TagInfoService tagInfoService;
	/**
	 * 查询标签列表
	 */
	@RequestMapping("/tagList")
	@ResponseBody
	public PageResult tagList() {
		try {
			log.info("==================");
			log.info("==================");
			log.info("==================");
			log.info("==================");
			log.info("==================");
			log.info("==================");
			List<TagInfo> tagList = tagInfoService.getTagList();
			return PageResultEx.ok().data(tagList);
		} catch (Exception e) {
			log.error("用户列表错误：", e);
			return PageResult.err();
		}
	}



}
